﻿#include "Judge_Direction.h"

Judge_Direction::Judge_Direction()
{

}
int Judge_Direction::J_Direct(HObject Img, HTuple ModelID,bool FMatch)
{
    int flag=0;
    HTuple  R, C, A, Score;
    try
    {
        if(FMatch)
        {
            FindShapeModel(Img, ModelID, -0.39, 0.79, 0.5, 1, 0.5, "least_squares",
                4, 0.9, &R, &C, &A, &Score);
            if(Score>0.1)
            {
                flag=1;
            }
            else
            {
                flag=-1;
            }
        }
        return flag;
    }
    catch(HException &exception)
    {
        return flag;
    }

}
